package com.enhe.gck.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.enhe.gck.CarbonRelationType;
import com.kuangkie.carbon.record.Updatable;
import com.kuangkie.carbon.record.annotation.Attribute;
import com.kuangkie.carbon.record.annotation.CarbonRecord;
import com.kuangkie.carbon.record.annotation.RecordCode;
import com.kuangkie.carbon.record.annotation.Relation;
import com.kuangkie.carbon.uid.model.UidManager;
import lombok.Data;

import java.math.BigDecimal;

// 组合充值明细
@Data
@CarbonRecord("hwane28312")
public class BundleRechargeDetail implements Updatable {
    @JSONField(name = "唯一编码")
    @RecordCode
    private Long id = UidManager.getLongUID();

    // 充值金额
    @JSONField(name = "充值金额")
    @Attribute("hwan28319")
    private BigDecimal rechargeAmount;

    // 备注
    @JSONField(name = "备注")
    @Attribute("hwan28320")
    private String note;

    // 币种
    @JSONField(name = "币种")
    @Attribute("hwan28321")
    private String currency;

    @Relation(CarbonRelationType.RR_组合充值明细_组合充值明细_银行账户)
    private Bank bank;

    @Override
    public String getRecordCode() {
        return this.id == null ? null : this.id.toString();
    }
}